import {request} from 'umi';

export async function fetchList(body) {
  return request('/mall/pkg/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function add(body) {
  return request('/mall/pkg/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function edit(body) {
  return request('/mall/pkg/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function del(body) {
  return request('/mall/pkg/del', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function status(id) {
  return request(`/mall/pkg/status/${id}`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
  });
}

export async function sellStatus(id) {
  return request(`/mall/pkg/sell-status/${id}`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
  });
}


